<template>
  <!-- 年龄比例 -->
  <div class="echarts">
    <ECharts :option="option" :resize="false" />
  </div>
</template>

<script setup lang="ts">
import ECharts from "@/components/ECharts/index.vue";
import { ECOption } from "@/components/ECharts/config";

const option: ECOption = {
  series: [
    {
      type: 'pie',
      radius: ['80%', '95%'],
      color: [
        '#FF549D',
        '#00F6FF',
      ],
      label: {
        position: 'inside',
        show: true,
        color: '#fff',
        fontSize: 16,
        formatter: function (params: any) {
          if (params.name !== '') {
            return '';
          }
        },
      },
      data: [
        { value: '36', name: '内宿生' },
        { value: '48', name: '外宿生' },
      ],
    },
  ],
}
</script>
<style lang="scss" scoped>
.echarts {
  width: 100%;
  height: 100%;
}
</style>
